<?php 
	$addnote=$_POST['add_note'];
	$time=time();
	$user=$_SESSION['userid'];
	if(isset($_POST['submit']))
	{
		
			mysql_query("insert into notes(content,time,user_id)
					value('$addnote','$time','$user')
									
			");
		
		echo '<script>window.location.href="index.php" </script>';
	}
?>